package bch.rocketmq.tomcat;

import jakarta.servlet.ServletContext;
import jakarta.servlet.ServletException;
import org.springframework.boot.web.servlet.ServletContextInitializer;
import org.springframework.stereotype.Component;

/**
 * SPI / ServletContainerInitializer 不触发
 */
@Component
public class MyServletContextInitializer implements ServletContextInitializer {

    @Override
    public void onStartup(ServletContext servletContext) throws ServletException {
        System.out.println("MyServletInitializer is invoked!");
        System.out.println(Thread.currentThread().getContextClassLoader());
    }
}
